package com.zq.widget.inverted.game.role.hp;

/**
 * Created by zhangqiang on 2018/3/29.
 */
public class HPProxy implements HP {

    private long hp;
    private final long totalHp;

    public HPProxy(long hp) {
        totalHp = this.hp = hp;
    }

    @Override
    public long totalHp() {
        return totalHp;
    }

    @Override
    public long getHp() {
        return this.hp;
    }

    @Override
    public boolean addHp(long hp) {

        this.hp += hp;
        return true;
    }

    @Override
    public boolean reduceHp(long hp) {
        this.hp -= hp;
        return true;
    }
}
